<template>
  <div>
    <Personinfo style="height: 50px;"></Personinfo>
    <logox></logox>
    <menux></menux>
    <el-main>
      <div>
        <h1>page1</h1>
        <p>{{msg}}</p>
        <el-link @click="testAjax" :underline="false">测试跨域请求</el-link>
      </div>
    </el-main>
    <el-footer>
      <el-row :gutter="20">
        <el-col :span="8" :offset="8">
          <footerx></footerx>
        </el-col>
      </el-row>
    </el-footer>
  </div>
</template>

<script>
import menux from './menux';
import logox from './Logox';
import footerx from './footerx';
import Personinfo from "./Personinfo";
import  {requestAjax} from "./../api/test";
export default {
  name: "page1",
  components: {menux,logox,footerx,Personinfo},
  data () {
    return {
      msg: "我是page1组件"
    }
  },methods:{
    testAjax() {
      requestAjax.r({test:'12312312'}).then(d=>{
        alert(d);
      })

    }
  }
}
</script>

<style scoped>
.el-main{
  margin:0 auto;
  background: azure;
  width: 1200px;
}
</style>